package com.icart.entities;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class MkDiscservitemEntityPK implements Serializable {
    private long tcid;
    private long servitem;

    @Column(name = "tcid")
    @Id
    public long getTcid() {
        return tcid;
    }

    public void setTcid(long tcid) {
        this.tcid = tcid;
    }

    @Column(name = "servitem")
    @Id
    public long getServitem() {
        return servitem;
    }

    public void setServitem(long servitem) {
        this.servitem = servitem;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MkDiscservitemEntityPK that = (MkDiscservitemEntityPK) o;

        if (tcid != that.tcid) return false;
        if (servitem != that.servitem) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (tcid ^ (tcid >>> 32));
        result = 31 * result + (int) (servitem ^ (servitem >>> 32));
        return result;
    }
}
